package com.szxy.task;

import com.szxy.sink.Sink;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class Input5MessagePollTask {

    @Autowired
    private Sink sink ;

    @Scheduled(initialDelay = 5000L,fixedRate = 5000L)
    public void poll(){
        sink.input5().poll(message -> System.out.println(message.getPayload()));
    }
}
